We present the data analysis and the X–ray source counts for the first season of XMM– Newton observations in the COSMOS field . The survey covers \sim 2 deg ^ { 2 } within the region of sky bounded by 9 ^ { h } 57.5 ^ { m } < R . A . < 10 ^ { h } 03.5 ^ { m } ; 1 ^ { d } 27.5 ^ { m } < DEC < 2 ^ { d } 57.5 ^ { m } with a total net integration time of 504 ks . A maximum likelihood source detection was performed in the 0.5–2 keV , 2–4.5 keV and 4.5–10 keV energy bands and 1390 point-like sources were detected in at least one band . Detailed Monte Carlo simulations were performed to fully test the source detection method and to derive the sky coverage to be used in the computation of the logN-logS relations . These relations have been then derived in the 0.5–2 keV , 2–10 keV and 5–10 keV energy bands , down to flux limits of 7.2 \times 10 ^ { -16 } erg cm ^ { -2 } s ^ { -1 } , 4.0 \times 10 ^ { -15 } erg cm ^ { -2 } s ^ { -1 } and 9.7 \times 10 ^ { -15 } erg cm ^ { -2 } s ^ { -1 } , respectively . Thanks to the large number of sources detected in the COSMOS survey , the logN-logS curves are tightly constrained over a range of fluxes which were poorly covered by previous surveys , especially in the 2–10 and 5–10 keV bands . The 0.5–2 keV and 2–10 keV differential logN-logS were fitted with a broken power-law model which revealed a Euclidean slope ( \alpha \sim 2.5 ) at the bright end and a flatter slope ( \alpha \sim 1.5 ) at faint fluxes . In the 5–10 keV energy band a single power-law provides an acceptable fit to the observed source counts with a slope \alpha \sim 2.4 . A comparison with the results of previous surveys shows good agreement in all the energy bands under investigation in the overlapping flux range . We also notice a remarkable agreement between our logN-logS relations and the most recent model of the XRB . The slightly different normalizations observed in the source counts of COSMOS and previous surveys can be largely explained as a combination of low counting statistics and cosmic variance introduced by the large scale structure .