How do you find the number of elements in a compound?

The number of elements in a compound is determined by chemical analysis.