This command will return the number of contacts in the specified world. You can then use this number to examine those contacts in greater detail with b2GetWorldContact. The parameter should be the integer handle of the world to be checked.
Syntax
Return as Integer = b2GetWorldContactCount(ID as Integer)