We focus on counting the number of labeled graphs on n vertices and treewidth at most k (or equivalently, the number of labeled partial k-trees), which we denote by Tn,k. So far, only the particular cases Tn,1 and Tn,2 had been studied. We show that (c⋅logkk⋅2k⋅n)n⋅2−2k(k+3)⋅k−2k−2≤Tn,k≤(k⋅2k⋅n)n⋅2−2k(k+1)⋅k−k, for k>1 and some explicit absolute constant c>0. The upper bound is an immediate consequence of the well-known number of labeled k-trees, while the lower bound is obtained from an explicit algorithmic construction. It follows from this construction that both bounds also apply to graphs of pathwidth and proper-pathwidth at most k.