Hi, You can get Count X++ select statement as
/// <summary>
/// Get resource poool count.
/// </summary>
/// <returns>
/// resource pool count.
/// </returns>
protected int getResourcePoolCount()
{
select count(Rank) from resourceTable
where resourceTable.UserSession == _userSession
&& resourceTable.ResourceSet == ProjResourceSet::Pool;
return resourceTable.Rank;
}