Groupoid of $G$ torsors over spectrum of a finite field: some clarifications I am trying to read Barghav Bhatt's online notes which show that if $f : X \to Y$ is a morphism of varieties over a finite field $\mathbb {F}_q$, then the generating function counting the image of the rational points in the image of $X$ is a rational function.
At some point, some notation which is supposedly standard but unfamiliar to me is used.
Namely let $X = \text{Spec}\mathbb{F}_q$, let $G$ be a finite group and let $B(G)(X)$ be the groupoid of $G$ torsors over $X$ in the etale topology. Then it is claimed that $B(G)(X)$ can be identified with the groupoid $\text{Map}(B(\mathbb{\hat{Z}}),B(G))$.
However, the notation $B(G)$ is unfamiliar to me. 
Furthermore, it is claimed that, since $B(G)$ is $\mathbb{Q}$-acyclic, using the Lefschetz trace formula we have that $B(G)(\mathbb{F}_q)$ has groupoid cardinality $1$. I will be happy for an explanation about this too.
Here is a link to the notes. The relevant parts to my question are Proposition 3.2 and Example 3.5.
http://www-personal.umich.edu/~bhattb/math/imgpointcount.pdf
 A: $BG$ describes a stack. The notation comes from algebraic topology, where it describes classifying spaces; these describe principal $G$-bundles, which are what algebraic topologists call $G$-torsors. 
There is a version of the Grothendieck trace formula for certain nice stacks; instead of telling you the number of points of a variety over a finite field, it tells you the groupoid cardinality of the groupoid of points of a nice stack over a finite field. At least as a homotopy type, $BG$ is $\mathbb{Q}$-acyclic (e.g. because group cohomology over $\mathbb{Q}$ is uninteresting: the functor it is the derived functor of is exact), so the trace formula returns $1$ for the groupoid cardinality of $BG(\mathbb{F}_q)$.
There is some topological intuition for this too: the topological analogue of the mapping stack $[B \hat{\mathbb{Z}}, BG]$ is the mapping space $[B \mathbb{Z}, BG] \cong [S^1, BG] \cong LBG$, the free loop space of $BG$. This can in turn be identified with the (homotopy) adjoint quotient $G/G$, and it's a general fact about groupoid cardinality that if $X$ is a groupoid and $G$ a group acting on that groupoid, then the (homotopy) quotient $X/G$ has groupoid cardinality $\frac{|X|}{|G|}$. 
