docs/web_connector/example_kohana_web_connector/application/classes/model/qbdata.php
public function GetQueueBreakdown() {
		$metrics = array();
		//Initialize metrics measurements
		$metrics['custadd'] = 0;
		$metrics['custmod'] = 0;
		//prepare and execute query
		$query = DB::select()->from('quickbooks_queue');
		$qentry = $this->_db->query(Database::SELECT, $query, FALSE)->as_array();

		foreach ($qentry as $entry) {
			if($entry['qb_action'] == 'CustomerAdd')
				$metrics['custadd']++;
			elseif($entry['qb_action'] == 'CustomerMod')
				$metrics['custmod']++;
		}
		return $metrics;
	}
public function GetQueueBreakdown() {
		$metrics = array();
		//Initialize metrics measurements
		$metrics['custadd'] = 0;
		$metrics['custmod'] = 0;
		//prepare and execute query
		$query = DB::select()->from('quickbooks_queue');
		$qentry = $this->_db->query(Database::SELECT, $query, FALSE)->as_array();

		foreach ($qentry as $entry) {
			if($entry['qb_action'] == 'CustomerAdd')
				$metrics['custadd']++;
			elseif($entry['qb_action'] == 'CustomerMod')
				$metrics['custmod']++;
		}
		return $metrics;
	}
/*
Check how many items are in queue right now