Does a transfer between two Roth IRA accounts from different companies count as a contribution?

In 2017, I had $1,200 (plus ~$40 in gains) in one Roth IRA account that I transferred to another Roth IRA account in 2018. Does this count as a contribution in addition to the money I placed within the latter account? In that same account I deposited $3,000 in contributions for the 2017 year but had already taken out $2,000 of that for 2018. Does this mean that my annual contribution for 2017 is $3,000 or $4,200?