The result times out because there is a large amount of /common/image topics. Usually, the way to request counts is:
{
"id" : null,
"return" : "count",
"type" : "/common/image"
}
But this will still time out on requests with a large amount of topics. You could query for the instance count which is tallied nightly:
{
"/freebase/type_profile/instance_count" : null,
"id" : "/common/image"
}
but that isn't real-time.
Lastly, you could count yourself by using a cursor and counting until the end of the result set:
{
"cursor": true,
"query": [{
"id" : null,
"type" : "/common/image"
}]
}
To find topics that have an image, you can query for them like so:
[
{
"id" : null,
"image" : [
{
"id" : null
}
],
"type" : "/common/topic"
}
]
Again, the resultset is very large and will time out, so you will need to cursor and count yourself.