Does an unpublished document you upload to ResearchGate count as prior publication when submitting to a journal?
The problem is less ResearchGate and more your field. As far as I know, ResearchGate, unlike Academia.edu, does not claim copyright or commercial license for your uploads; and they refer to their upload service as more self-archiving than anything else. That said, different fields and different publishers have different attitudes toward what it means to be prior publications. 

In Mathematics (my field), for example, almost certainly no journal will count uploads to pre-print repositories or online social media or your own webpage as prior publication. 

In fields like Medicine and some subfield of Biology, the rules are much stricter, where sometimes too-detailed conference posters can count as prior publication when it comes to journal submissions. Wikipedia has a listing which shows, e.g., journals of the American Society for Microbiology having this type of strict pre-publication rule. 

So the only general advice for your question is: consult the website of the journal to which you intend to submit your articles.