There is no such time limits.
If a customer gives you the projects repeatedly over few weeks or months, you may consider them as long term contracts. Also if a customer didnt ends a contract on a single project and keep on working on that, you can consider that too as a long term contract.
With your direct clients how do you calculate a long term contract? Same approach you can keep here too.