Statistics for Gravitational microlensing and the search for extrasolar planets