<p>I have two machines setup to run Visual Studio 2008 (SP1) &amp; NET Framework 3.5 (SP1). If I create a .tt file in a console appliaction on machine #1 it automatically creates the sub .cs file for me, however if I do the exact same on machine #2 then no sub .cs file is created.</p>

<p>I have tried toggling the "Show All Files" option, restarting visual studio (multiple times), added new <code>.tt</code> files (with the same outcome), tried it in both a C# and a VB.NET project and Google is drawing up blanks. </p>

<p>Is it possible for T4 text templates to have been disabled somehow? If so, then how the heck do I turn them back on, it's annoying :-).?</p>

I'm assuming you want a count of the number of rows you'll be reading so as to do some pagination or similar? I don't understand your need for the LIMIT in the context of your question. However, if you just want a count of how many rows have been found, use one of the following.
You select the count of all rows such as:
```
```
select count(*) as counted, name, address
from contact
```
```
Or found rows:
```
```
SELECT SQL_CALC_FOUND_ROWS, name, address
from contact
```
```
This may be mysql specific I'm not sure.
Update:
For pagination you would do something like the following - (Psuedocode)
$rows = array($result)
$num_rows = sql_calc_found_rows
$per_page = 20
$pages = ceil($num_rows / $per_page)
page
$rows_this_page = array()
$rows_this_page = get_values($rows, (min index)$page_number * $per_page - $per_page, (max index)$page_number * $per_page - 1)