The Journal Citation Reports (JCR) are a byproduct of Clarivate Analytics' Web of Science. Hence, citations that are in Web of Science are also counted in the JCR. So, your question boils down to this: if you cite a work that has not been formally published yet, will it be recognized as such in Web of Science?
The citation matching algorithm of Web of Science is a company secret, as far as I'm aware, so I canot give a definitive answer. In my personal experience (for what it's worth), citations to unpublished work (mentioning all bibliographic details, including DOI) are usually recognized if the publication year is correct. This is sometimes hard because publication delays may take up to (or more than) a year.
What can you do? First, make sure that all verifiable details in your reference are correct, including author names, journal, title and DOI. Second, if it eventually turns out that Web of Science did not process the citation link between your paper and the one cited correctly, there is an easy solution: you can ask for a correction. If DOIs and other metadata match, then this is typically no problem. It may take a few weeks before the request is processed though.