Why are you intent on transferring? It may be much better to apply as a freshman rather than go the community college route. Freshman admit rates are often higher, and it is rare for colleges to offer large merit scholarships to transfer students.
It is considerably more difficult to be admitted to these colleges as a transfer applicant than as a freshman, and that goes double for an international student needing financial aid.
Note that Cornell does not have financial aid available for international transfer students.
Their admissions websites are very clear on the subject. I would not exceed two years (4 semesters or 6 quarters) of credits.
That said, there are many colleges besides the Ivies, some of which are stronger in computer science. Georgia Tech and Wisconsin, for example, do not mention such a restriction.