# How can I construct modules as quotient algebras?

I would like to do the following: given a field k and an ideal I of A = k[x1,...,x_n], I would like to construct the k-module A/I and, when A/I is finite as a k-module, compute its rank. Is this possible in Sage?