Ideal counting function in cubic fields