+ status_count = Repo.aggregate(User.Query.build(%{local: true}), :sum, :note_count)
+
+ user_count = Repo.aggregate(User.Query.build(%{local: true, active: true}), :count, :id)
+
+ %{
+ peers: peers,
+ stats: %{
+ domain_count: domain_count,
+ status_count: status_count,
+ user_count: user_count
+ }
+ }
+ end