Please convert SQL query into SWQL
Select Count(1) From Nodes a Inner Join NodesCustomProperties b on a.NodeID = b.NodeIDWhere b.Department = 'IT Division DataCenter'
Unless I'm missing something, you are probably looking for something like:
Select Count(1) as CountItemsFrom Orion.Nodes [N]Where [N].CustomProperties.Department = 'IT Division DataCenter'
select count(1) as countnodes from orion.nodes where status<>1