You get a feel for things after awhile - but basically anytime you spot a chunk bigger than 2 lines long of nearly identical code, its time for a new function.

The other metric is that of a "thought".

Each thought should be a function/method/reusable thing.

The more advanced a program gets - the smaller it gets.