The function you are looking for is called cardinal (as in dialing power).
Example:
module M = Map.Make(String) let m = M.singleton "x" "y" let () = Printf.printf "%d\n" (M.cardinal m)
This will print 1 , since there is only one binding.
Reimer behrends
source share