The ideal time to count the 'Omer is after the emergence of three stars, even on Friday night. According to the Shulhan 'Arukh this is the appropriate way to perform the counting of the 'Omer.
One may count the 'Omer after the stars come out even if one has not yet prayed 'Arbith. However, ideally, one should pray 'Arbith first and then count the 'Omer because of the concept of Tadir WeShe-eino Tadir -- something that takes place regularly ('Arbith) takes precedence over something that only comes occasionally (counting the 'Omer).
(Shulhan 'Arukh 489:2. Orah Hayyim Haggadah, Sefirath Ha'omer 9. Mishnah Berurah ibid, 14. Kaf Hahayim ibid, 43)