What is the dimension of the ring $\mathbb{Q}[x]/\left((x+1)^2\right)$ as a $\mathbb{Q}$-vector space?