ORM: use .count() or .select_related() when needed
ORM: use .count() or .select_related() when needed

Change-Id: Idecf2cc8bdcd1b3b1c3cc85256239ceb54f9efb5

Linaro/lava-server,Linaro/lava-server,Linaro/lava-server,Linaro/lava-server