Is there a function which could tell me the number of running processes?

Thank you.