Dev 1.0 First Pull Request

this can be simplified as follows : 
```php
return $db->value('SELECT COUNT(id) FROM thread');
```