# -*- coding: utf-8 -*-
"""
Created on Fri Jun 18 14:27:34 2021

@author: rukap
"""

import urllib.request, urllib.parse, urllib.error
import xml.etree.ElementTree as ET
import ssl
sumtillnow=0
input='''
<commentinfo>
<note>This file contains the actual data for your assignment - good luck!</note>
<comments>
<comment>
<name>Letizia</name>
<count>93</count>
</comment>
<comment>
<name>Jed</name>
<count>93</count>
</comment>
<comment>
<name>Data</name>
<count>92</count>
</comment>
<comment>
<name>Clyde</name>
<count>91</count>
</comment>
<comment>
<name>Murdina</name>
<count>89</count>
</comment>
<comment>
<name>Chin</name>
<count>87</count>
</comment>
<comment>
<name>Blair</name>
<count>86</count>
</comment>
<comment>
<name>Eiko</name>
<count>85</count>
</comment>
<comment>
<name>Arnav</name>
<count>85</count>
</comment>
<comment>
<name>Kieron</name>
<count>84</count>
</comment>
<comment>
<name>Mika</name>
<count>83</count>
</comment>
<comment>
<name>Jaydon</name>
<count>80</count>
</comment>
<comment>
<name>Glascott</name>
<count>79</count>
</comment>
<comment>
<name>Sean</name>
<count>75</count>
</comment>
<comment>
<name>Victor</name>
<count>72</count>
</comment>
<comment>
<name>Mya</name>
<count>71</count>
</comment>
<comment>
<name>Burhan</name>
<count>70</count>
</comment>
<comment>
<name>Kristofer</name>
<count>69</count>
</comment>
<comment>
<name>Tee</name>
<count>68</count>
</comment>
<comment>
<name>Darien</name>
<count>68</count>
</comment>
<comment>
<name>Darach</name>
<count>67</count>
</comment>
<comment>
<name>Abubakar</name>
<count>67</count>
</comment>
<comment>
<name>Breah</name>
<count>66</count>
</comment>
<comment>
<name>Aoibhe</name>
<count>65</count>
</comment>
<comment>
<name>Billie</name>
<count>62</count>
</comment>
<comment>
<name>Sihaam</name>
<count>54</count>
</comment>
<comment>
<name>Rhyley</name>
<count>49</count>
</comment>
<comment>
<name>Carson</name>
<count>48</count>
</comment>
<comment>
<name>Msughter</name>
<count>47</count>
</comment>
<comment>
<name>Shaurya</name>
<count>47</count>
</comment>
<comment>
<name>Jeyun</name>
<count>44</count>
</comment>
<comment>
<name>Benny</name>
<count>43</count>
</comment>
<comment>
<name>Aieecia</name>
<count>39</count>
</comment>
<comment>
<name>Martyna</name>
<count>38</count>
</comment>
<comment>
<name>Skylar</name>
<count>37</count>
</comment>
<comment>
<name>Kit</name>
<count>35</count>
</comment>
<comment>
<name>Lucien</name>
<count>34</count>
</comment>
<comment>
<name>Ameelia</name>
<count>33</count>
</comment>
<comment>
<name>Johndean</name>
<count>31</count>
</comment>
<comment>
<name>Jesuseun</name>
<count>26</count>
</comment>
<comment>
<name>Ainsley</name>
<count>23</count>
</comment>
<comment>
<name>Shaughn</name>
<count>21</count>
</comment>
<comment>
<name>Emon</name>
<count>20</count>
</comment>
<comment>
<name>Annika</name>
<count>20</count>
</comment>
<comment>
<name>Shafira</name>
<count>18</count>
</comment>
<comment>
<name>Sineidin</name>
<count>15</count>
</comment>
<comment>
<name>Cahlum</name>
<count>14</count>
</comment>
<comment>
<name>Jeevan</name>
<count>13</count>
</comment>
<comment>
<name>Nate</name>
<count>11</count>
</comment>
<comment>
<name>Shona</name>
<count>10</count>
</comment>
</comments>
</commentinfo>'''

stuff=ET.fromstring(input)
lst=stuff.findall('comments/comment')
print('Number of Numbers:',len(lst))

for item in lst:
    print('Count is equal to:', item.find('count').text)
    value=int(item.find('count').text)
    sumtillnow=sumtillnow+value
print('Sum', sumtillnow)    
    