Do you normally repeat the subject in Hebrew? Like, ten men and fourteen men. Instead of ten and fourteen men. (Bad example. Another would be, in Hebrew: He wants ice cream after lunch, she wants ice cream after dinner. In English, you wouldn't have to repeat "ice cream." You might say, "they both want ice cream, but he wants it after lunch, her choice is after dinner."
I don’t think your second example is actually so relevant to what you’re asking. But absolutely, of course you can replace a noun that has already been mentioned with “it”.
For this particular sentence: you’d just say עשרה without repeating גברים. It’s just left in here to make it less confusing for learners.