Well in a word, maybe! This is done often, but the devil is in the details.
The number of sproket teeth would be your PRR (Pulse Repetition Rate). PRR x RPM = Counts per Minute, but you would do better with Hertz (counts per second) so divide by 60 and you have Hz. This will permit you know that you have not exceeded your system's' ability to count every pulse.
If high accuracy is needed, you need a system that can count much more than you care about so that you can throw away a digit or so. I like to measure 10 times finer than I intend to use.
Then there is the issue of matching the sensor to the sproket. If the sensor is too small, it must be very close to the sproket. If is is too large, it may bridge from one tooth to the next and loose counts. In the summer it may "see" more than in the winter, so you may have to adjust it slightly forward in winter and back in summer, if it is not an ideal match. After a few years, I usually found a place where they worked all year, but I had a few hundred to keep in operation. There was always something.... but I digress.
Now as I am fond of asking, "What do you wish to achieve ?"
Best Regards,
Bob A.