Currently there are
- __FORCETOC__ that enforces displaying of the TOC even if it has less than specified number of items on its usual position.
- __TOC__ that enforces displaying of the TOC even if it has less than specified number of items on given position.
There is no way, how to place the TOC on given position AND have it displayed only when it's larger than specified number of items.
Suggesting the __SOFTTOC__, __CONDTOC__, __VARTOC__ or __FLOWTOC__ magic word for that.
Also mind T19587: alias __TOC__ to {{#TOC}} and add TOC style options to such parser function when solving this.