Back in olden times, just as in many rural regions today, a man’s wealth was measured, not by the money he might have in the bank nor the land that he held, but by the cattle that he owned; that is, the number of sheep, cows, or goats that he had.
Now the Latin word for such a general collection of farm animals was pecus. Therefore, it followed that pecus also came to mean personal wealth or riches.
But in later times, when property began to consist of other forms of wealth, the Romans altered the term slightly into pecunia, a word broad enough in meaning to include money as well as other riches, but which ultimately meant money in particular.
From this was formed our adjective pecuniary, which we use to mean pertaining to money or wealth.
The prefix im- “without” or “lacking,” gives us impecunious, without or lacking wealth, or, in the older Roman meaning, pertaining to a person who has no cattle.