Atlassian Interview Question

Create a data structure which counts the amount of data held by it's components, which some basic removal and retrieval