The Poincare Problem For A Foliated Surface